<?php

class Skjb_Search_Xapian_Weight_Trad extends Skjb_Search_Xapian_Weight
{
    public $_cPtr=null;

    function __construct($k=null) {
        switch (func_num_args()) {
        case 0: $r=new_TradWeight(); break;
        default: $r=new_TradWeight($k);
        }
        $this->_cPtr=$r;
    }

    function clone_object() {
        $r=TradWeight_clone_object($this->_cPtr);
        return is_resource($r) ? new Skjb_Search_Xapian_Weight_Trad($r) : $r;
    }

    function name() {
        return TradWeight_name($this->_cPtr);
    }

    function serialise() {
        return TradWeight_serialise($this->_cPtr);
    }

    function unserialise($s) {
        $r=TradWeight_unserialise($this->_cPtr,$s);
        return is_resource($r) ? new Skjb_Search_Xapian_Weight_Trad($r) : $r;
    }

    function get_sumpart($wdf,$len) {
        return TradWeight_get_sumpart($this->_cPtr,$wdf,$len);
    }

    function get_maxpart() {
        return TradWeight_get_maxpart($this->_cPtr);
    }

    function get_sumextra($len) {
        return TradWeight_get_sumextra($this->_cPtr,$len);
    }

    function get_maxextra() {
        return TradWeight_get_maxextra($this->_cPtr);
    }

    function get_sumpart_needs_doclength() {
        return TradWeight_get_sumpart_needs_doclength($this->_cPtr);
    }
}